<div class="alert alert-success"><span class="glyphicon glyphicon-info-sign"></span> 请完成以下开发模式的配置。</div>

<!--<form action="" class="form-horizontal" role="form">
	<div class="form-group">
	    <label class="col-sm-2 control-label">接口URL</label>
	    <div class="col-sm-4">
			<input type="text" readonly="readonly" id="url" class="form-control" value="{$wechat.url}" datatype="*"/>
			<a href="javascript:void(0)" id="copyUrl">复制接口URL</a>
		</div>
	</div>
	<div class="form-group">
	    <label class="col-sm-2 control-label">接口Token</label>
	    <div class="col-sm-2">
			<input type="text" id="token" id="token" readonly="readonly" class="form-control" value="{$wechat.token}" />
			<a href="javascript:void(0)" id="copyToken">复制接口Token</a>
		</div>
		<button type="submit" class="btn btn-default submit" data-loading-txt="更新中，请稍后……" data-action-callback="1" data-ajax-url="__CONTROLLER__/updateTokenPost">更新Token</button>
	</div>
</form>-->

<form action="" class="form-horizontal" role="form">
	
	<div class="form-group">
	    <label class="col-sm-2 control-label">微信号</label>
	    <div class="col-sm-4">
	    	<input type="text" class="form-control" name="name" value="{$wechat.name}" datatype="*" />
	    </div>
	</div>
	
	<div class="form-group">
	    <label class="col-sm-2 control-label">开发者AppId</label>
	    <div class="col-sm-4">
	    	<input type="text" class="form-control" name="appid" value="{$wechat.appid}" />
	    </div>
	</div>
	
	<div class="form-group">
	    <label class="col-sm-2 control-label">开发者AppSecret</label>
	    <div class="col-sm-4">
	    	<input type="text" class="form-control" name="appsecret" value="{$wechat.appsecret}" />
	    </div>
	</div>
	
	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-8">
			<input type="hidden" class="form-control" name="id" value="{$wechat.id}" />
			<button type="submit" class="btn btn-primary submit" data-loading-txt="更新中，请稍后……" data-ajax-url="__CONTROLLER__/indexPost">保存更改</button>
		</div>
	</div>
</form>
<style>
	form:nth-of-type(1){
		border-bottom:1px solid #ccc;
		margin-bottom:20px;
	}
</style>
<script type="text/javascript" src="__PUBLIC__/Style/Common/js/ZeroClipboard.js"></script>
<script>
	function actionCallback( data) {
		$("#token").val( data.token );
		$().copyPaste({
			text: $("#token").val(),
			id: "copyToken"
		});
	}
	$().copyPaste({
		text: $("#url").val(),
		id: "copyUrl"
	});
	$().copyPaste({
		text: $("#token").val(),
		id: "copyToken"
	});
</script>